#include "com_changba_songstudio_util_FFmpegUtils.h"
#include <command/ffmpeg.h>

JNIEXPORT jint JNICALL Java_com_changba_songstudio_util_FFmpegUtils_run(JNIEnv *env, jclass type, jobjectArray commands) {

    int argc = (*env)->GetArrayLength(env, commands);
    char *argv[argc];

    int i;
    for (i = 0; i < argc; i++) {
        jstring js = (jstring) (*env)->GetObjectArrayElement(env, commands, i);
        argv[i] = (char*) (*env)->GetStringUTFChars(env, js, 0);
    }
    return run(argc, argv);

}